var app = getApp();

Page({
    data: {
        ccusList:"",
        btmimage: "/hyb_jianzhi/images/logo.png",
    },
    onLoad: function(n) { 
        var self = this;
        self.loadAgentList();
    },
    loadAgentList:function(){
        var self = this;
         app.util.request({
            url: "entry/wxapp/Hz_goods",
            data: {
                openid: wx.getStorageSync("openid")
            },
            success: function(a) {
                console.log("代理商"+JSON.stringify(a));
                self.setData({
                    ccusList:a.data.data
                })
            }
        })
    },
    getform: function(o) {
        console.log(o), app.util.request({
            url: "entry/wxapp/Formid",
            data: {
                openid: wx.getStorageSync("openid"),
                formid: o
            },
            success: function(o) {}
        });
    },
    setSuperior:function(e){
        var ccusId = e.currentTarget.dataset.id;
         wx.navigateTo({
            url: "/hyb_jianzhi/set_superior/set_superior?typeId=" + ccusId
        });
    },
    lockSuperior:function(e){
        var ccusId = e.currentTarget.dataset.id,shopname=e.currentTarget.dataset.shopname,price=e.currentTarget.dataset.price;
         wx.navigateTo({
            url: "/hyb_jianzhi/lock_superior/lock_superior?typeId=" +ccusId+"shopname="+shopname+"price="+price
        });
    },
    addSuperior:function(e){
        var ccusId = e.currentTarget.dataset.id;
         wx.navigateTo({
            url: "/hyb_jianzhi/add_superior/add_superior?typeId=" + ccusId
        });
    },
    hdlchange:function(){
         wx.navigateTo({
            url: "/hyb_jianzhi/mycharges/mycharges"
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});